Package MusicLandscape.entities
Class Album.TrackListItem
- java.lang.Object
-
- MusicLandscape.entities.Album.TrackListItem
-
- Enclosing class:
- Album
private static class Album.TrackListItem extends java.lang.ObjectA single item of a linked list of tracks.
A single list item consists of the primary data, in our case a track, and a reference to its successor, which is another list item.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) Album.TrackListItemnextA reference to the next item in the list.(package private) TracktrackThe primary data of this list item.
-
Constructor Summary
Constructors Constructor Description TrackListItem(Track t)Creates a list item from a track.
Simply wraps a list item around a track, so it can be inserted into a linked list of tracks.
-
-
-
Field Detail
-
next
Album.TrackListItem next
A reference to the next item in the list.
-
track
Track track
The primary data of this list item.
-
-
Constructor Detail
-
TrackListItem
public TrackListItem(Track t)
Creates a list item from a track.
Simply wraps a list item around a track, so it can be inserted into a linked list of tracks.This list item does NOT maintain its own copy of the original track. It means a track in the list can be modified from the caller who might still maintain a reference, however, the list structure is protected.
- Parameters:
t- the track of this list item
-
-